Skip to content

PR 2/10 — Port shared models and SCSS - #754

Open
devanshi-gpta wants to merge 1 commit into
devin-09.08.2026-devanshi/scaffold-react-vite-appfrom
devin-09.08.2026-devanshi/port-models-and-shared-styles
Open

devanshi-gpta wants to merge 1 commit into
devin-09.08.2026-devanshi/scaffold-react-vite-appfrom
devin-09.08.2026-devanshi/port-models-and-shared-styles

Conversation

@devanshi-gpta

Copy link
Copy Markdown

Summary

Part of the Angular -> React migration chain; based on devin-09.08.2026-devanshi/scaffold-react-vite-app. Types-and-styles only — no components or logic.

  • src/app/shared/models/*.ts -> react-app/src/models/, converted from classes to interfaces (they were used purely as types); FeedType stays a string-literal union. Field names/types unchanged, except Story gains the optional content and text fields the Angular templates read (item.content / item.text), and fields the HN API omits are optional (Story.url|domain|comments|poll|poll_votes_count|deleted|dead, Comment.deleted, User.about). Story.time_ago: number is kept verbatim from the Angular model even though the API returns a string, to avoid behavioural drift in this PR.
  • _media.scss, _theme_variables.scss, _themes.scss copied unchanged into react-app/src/styles/ (their relative @imports still resolve). src/styles.scss -> react-app/src/styles/styles.scss with the import repointed to ./themes and the Angular-only host selectors swapped for the React root:
-@import "./app/shared/scss/themes";
+@import "./themes";
-app-root:empty + .app-loader { ... }
+#root:empty + .app-loader { ... }
  • main.tsx imports ./styles/styles.scss globally (not CSS Modules, so theme class names stay global).

Proposed fixes

  • vite.config.ts: test.passWithNoTests: true — the scaffold has a vitest setup but no spec files yet, so npm test exited 1 on the base branch; later PRs in the chain add real tests.
  • Sass emits deprecation warnings for @import / darken() from the copied theme files; left as-is to keep the copy faithful, worth a follow-up to move to @use / color.adjust.

Verified in react-app/: npm run typecheck, npm run lint, npm test, npm run build all pass.

Link to Devin session: https://app.devin.ai/sessions/09c4d1e3aa4f4f928ab6f6b0ac47ee03
Open in Devin Desktop: https://app.devin.ai/desktop/session/09c4d1e3aa4f4f928ab6f6b0ac47ee03?variant=devin
Requested by: @devanshi-gpta

Co-Authored-By: Devanshi Gupta <devanshi.gupta@cognition.ai>
@devin-ai-integration

Copy link
Copy Markdown

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant